package com.hopu.v1.service.admin.system;

import com.hopu.v1.pojo.system.Announcement;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author DELL
* @description 针对表【s_announcement】的数据库操作Service
* @createDate 2024-10-10 17:04:03
*/
public interface AnnouncementService extends IService<Announcement> {

    /**
     * 查询所有公告
     * @param announcementTitle
     * @param announcementStatus
     * @return
     */
    List<Announcement> selectAnnouncement(String announcementTitle,Integer announcementStatus);

    /**
     * 添加公告
     * @param announcement
     */
    void insertAnnouncement(Announcement announcement);

    /**
     * 修改公告
     * @param announcement
     */
    void updateAnnouncement(Announcement announcement);

    /**
     * 公告标题验重
     * @param announcement
     * @return
     */
    boolean checkAnnouncementTitle(Announcement announcement);

    /**
     * 批量删除公告
     * @param ids
     */
    void deleteAnnouncement(List<Integer> ids);

    /**
     * 修改状态创建发布时间
     * @param announcement
     * @return
     */
    void updateStatus(Announcement announcement);

    List<Announcement> select(Integer announcementStatus);
}
